<template>
	<view>
		<!-- 订单列表 -->
		<view class="ddlb">
			<view class="dd">
				<view class="dd-top">
					<view class="dd-q">
						订单编号：{{order_info_data.msg.order_info.tms_order_sn || ''}}
					</view>
					<view class="dd-p"
					
					:style="
					order_info_data.msg.order_info.status==1?'color:#1890FF;':
					order_info_data.msg.order_info.status==2?'color:#CF9200;':
					order_info_data.msg.order_info.status==3?'color:#CF9200;':
					order_info_data.msg.order_info.status==4?'color:#0ACF00;':''
					"
					>
						<!-- 订单状态:1=待发车,2=运输中,3=待配送,4=已送达 -->
						{{
							order_info_data.msg.order_info.status==1?'待发车':
							order_info_data.msg.order_info.status==2?'运输中':
							order_info_data.msg.order_info.status==3?'待配送':
							order_info_data.msg.order_info.status==4?'已送达':''
						}}
						
					</view>
				</view>
				<view class="dd-dd">

					
					<!-- 是否垫资 0 未垫资 1=垫资 -->
					<p>是否垫付：{{order_info_data.msg.order_info.is_advance==0?'未垫资':'垫资'}}</p>
					<p>运费：200</p>
					<!-- 是否需要配送 0不需要 1=需要 -->
					<p>是否送货：{{order_info_data.msg.order_info.is_delivery==0?'不需要':'需要'}}</p>
					<p>配送费：{{order_info_data.msg.order_info.delivery_amount}}</p>
					<p>垫资金额：{{order_info_data.msg.order_info.advance_amount}}</p>
					<p>合计：{{order_info_data.msg.order_info.order_amount || ''}}</p>
				</view>
				
			</view>
			
			<view style="background-color: #fff;margin-top: 10px;"
			v-for="(time,index) in order_info_data.msg.order_goods.data"
			>
				<view class="dd-dd">
					<p>货物名称：{{time.goods_name}}</p>
					<p>货物件数：{{time.goods_nums}}件</p>
					<p>吨数：{{time.goods_weight}}吨</p>
					<p>货物规格：{{time.goods_specs}}m</p>
				</view>	
			</view>
			
			
			<view cl style="background-color: #fff;margin-top: 10px;">
				<view class="dd-dd">
					<p class="qqq">是否垫付：</p>
					<p class="ppp" >{{order_info_data.msg.order_info.is_advance==0?'否':'是'}}</p>

					<p class="qqq">是否送货：</p>
					<p class="ppp" >{{order_info_data.msg.order_info.is_delivery==0?'否':'是'}}</p>
					
					<p class="qqq">收货人地址：</p>
					<p class="ppp" >{{order_info_data.msg.order_info.address}}</p>
					
					<p class="qqq">收货人姓名：</p>
					<p class="ppp" >{{order_info_data.msg.order_info.username}}</p>
					
					<p class="qqq">收货人电话：</p>
					<p class="ppp" >{{order_info_data.msg.order_info.mobile}}</p>
				</view>	
			</view>


			<!-- <button>申请车费</button> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				order_info_data:null,
				id:""
			}
		},
		onLoad(open) {
				this.id=open.id;
				this.order_info();
		},
		methods: {
			//订单详情
			order_info()
			{
				//0=不分状态运单列表，1=申请运费运单列表，2=申请保证金运单列表
				let data = {
								order_id: this.id
							}
				this.$rqt.order_info(data).then(res => {
					console.log(res);
					this.order_info_data = res;
					// uni.showToast({
					// 	title: res.msg,
					// 	icon: "success",
					// 	duration: 850
					// });
				})
			}
		}
	}
</script>
<style>
	page{
		background: #F7F7F7;
	}
</style>
<style scoped>
	.qqq{
font-size: 16px;
font-weight: 600;
	}
	.ppp{
		text-align: right;
	}
/* 订单列表 */
.ddlb{
	padding-bottom: 20px;
	width: 100%;
	margin: 0 auto;
}

.ddlb>button{
	margin-top: 20px;
	width: 95%;
	height: 50px;
	box-shadow: 0px 0px 4px 0px rgba(204,204,204,0.5);
	color: #fff;
	background: #1890FF;
}
.dd{
	width: 100%;
	padding-bottom: 10px;
	background: #FFFFFF;
	box-shadow: 0px 0px 6px 0px rgba(204,204,204,0.5);
}
.dd-top{
	width: 100%;
	display: flex;
	justify-content: space-between;
	border-bottom: 1px dashed #CCCCCC;
}
.dd-q{
font-size: 18px;
font-weight: 500;
margin-left: 20px;
	line-height: 50px;	
	
}
.dd-p{
	font-size: 18px;
	line-height: 50px;
	margin-right: 20px;
	color: #0ACF00;
	font-weight: 600;
}
.dd-dd{
	overflow: hidden;
	width: 90%;
	margin: 0 auto;
}
.dd-dd>p{
	line-height: 40px;
	float: left;
	width: 50%;
	font-size: 16px;
	font-weight: 400;
}
</style>
